	
// Identifikation.h : Declaration of the CIdentifikation

#ifndef __IDENTIFIKATION_H_
#define __IDENTIFIKATION_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CIdentifikation
class ATL_NO_VTABLE CIdentifikation : 
	public CComObjectRootEx<CComMultiThreadModel>,
	public CComCoClass<CIdentifikation, &CLSID_Identifikation>,
	public ISupportErrorInfo,
	public IDispatchImpl<IIdentifikation, &IID_IIdentifikation, &LIBID_EBASDLLLib>
{
public:
	CIdentifikation()
	{
		m_pUnkMarshaler = NULL;
	}

DECLARE_REGISTRY_RESOURCEID(IDR_IDENTIFIKATION)
DECLARE_GET_CONTROLLING_UNKNOWN()

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CIdentifikation)
	COM_INTERFACE_ENTRY(IIdentifikation)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(ISupportErrorInfo)
	COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
END_COM_MAP()

	HRESULT FinalConstruct()
	{
		return CoCreateFreeThreadedMarshaler(
			GetControllingUnknown(), &m_pUnkMarshaler.p);
	}

	void FinalRelease()
	{
		m_pUnkMarshaler.Release();
	}

	CComPtr<IUnknown> m_pUnkMarshaler;

// ISupportsErrorInfo
	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);

// IIdentifikation
public:
	STDMETHOD(get_GUID)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_GUID)(/*[in]*/ BSTR newVal);
	STDMETHOD(get_Identifikation)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_Identifikation)(/*[in]*/ BSTR newVal);
private:
	bstr_t m_identifikation, m_guid;
};

#endif //__IDENTIFIKATION_H_
